Skip to content

Allow attaching an IWICBitmapSource instance directly. #1266

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Aug 14, 2025

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Aug 13, 2025

This PR adjusts the experimental WIC bitmap attachment support I recently added so that a test author can attach an instance of IWICBitmapSource (which is the parent type of the already-supported IWICBitmap.) Protocols and conformances are adjusted to match.

This PR then explicitly adds conformances to every COM class in WIC that subclasses IWICBitmapSource since we can't see COM class inheritance in Swift (yet?)

I could have left the protocols as-is, but then you'd have to convert an IWICBitmapSource to an IWICBitmap (by allocating a new COM object) then cast it back to an IWICBitmapSource (by calling QueryInterface() and juggling the refcount) in order to actually attach it.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

This PR adjusts the experimental WIC bitmap attachment support I recently added
so that a test author can attach an instance of `IWICBitmapSource` (which is the
parent type of the already-supported `IWICBitmap`.) Protocols and conformances
are adjusted to match.

I could have left the protocols as-is, but then you'd have to convert an
`IWICBitmapSource` to an `IWICBitmap` (by allocating a new COM object) then cast
it back to an `IWICBitmapSource` (by calling `QueryInterface()` and juggling the
refcount) in order to actually attach it.
@grynspan grynspan added this to the Swift 6.x (main) milestone Aug 13, 2025
@grynspan grynspan self-assigned this Aug 13, 2025
@grynspan grynspan added the enhancement New feature or request label Aug 13, 2025
@grynspan grynspan added windows 🪟 Windows support attachments/activities 🖇️ Work related to attachments and/or activities labels Aug 13, 2025
@grynspan grynspan requested a review from compnerd August 13, 2025 19:25
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit 2b45ed1 into main Aug 14, 2025
3 checks passed
@grynspan grynspan deleted the jgrynspan/iwicbitmapsource branch August 14, 2025 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attachments/activities 🖇️ Work related to attachments and/or activities enhancement New feature or request windows 🪟 Windows support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants